home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Simple_Module2 / smakefile < prev    next >
Makefile  |  1998-09-20  |  3KB  |  122 lines

  1.  
  2. # Makefile for a sample Opus 5 module
  3. # This is based on the structure of the real Opus makefile, but may be
  4. # adapted as you see fit
  5.  
  6. # Declare some variables, so we must not change multiple lines
  7. # Object files for this module
  8.  
  9. EXAMPLEOBJS   =  modinit.o ModuleEntry.o ExampleRequest.o Window.o HiddenCommand.o buildinstrings.o
  10.  
  11. # You should always have the modinit.o on the first place. After this
  12. # there should be your file with the L_ModuleEntry() function. All other
  13. # may follow like you want...
  14.  
  15.  
  16. # Library-Name/-Version/-Revision
  17. # use only lowercase for the name of the module
  18.  
  19. MODULENAME    = example.module
  20. EXAMPLEVER    = 56
  21. EXAMPLEREV    = 0
  22.  
  23.  
  24. # Compiler options
  25. CCOPTS =  noversion optimize
  26.  
  27. # Linker options
  28. SLINKOPTS = noicons smallcode smalldata
  29.  
  30.  
  31. #######################################################################
  32.  
  33. # If you have "ALL" in the tooltypes of your "Build" icon, this objects
  34. # will be created...
  35.  
  36. ALL: includes/buildin.strings $(MODULENAME)
  37.  
  38. #######################################################################
  39.  
  40. # Note to the line starting with "lib" :
  41. # The last entry is an object library created by Dirk Stoecker. This
  42. # does supply some replacements for the string.h and some other stuff
  43. # (in conclusion with sdi_std.h)
  44. # This results in smaller code. It is your choice ...
  45. # If you don't want use it, delete "lib:sdi_std.lib", but you must
  46. # include instead the "string.h" (if you need their functions).
  47.  
  48. # Do not modify other stuff here !!!
  49.  
  50. $(MODULENAME): $(EXAMPLEOBJS) smakefile scoptions
  51.                slink with <<
  52. libprefix _L_
  53. libfd modules.fd
  54. from lib:libent.o lib:libinit.o $(EXAMPLEOBJS)
  55. to $@
  56. lib lib:sc.lib lib:amiga.lib lib:dopuslib.lib /sc/lib/sdi_std.lib
  57. libversion $(EXAMPLEVER)
  58. librevision $(EXAMPLEREV)
  59. $(SLINKOPTS)
  60. <
  61.  
  62. #######################################################################
  63.  
  64. # This will create the string file
  65.  
  66. buildinstrings.o : includes/buildin.strings
  67.                    setdate buildinstrings.c
  68.                    sc buildinstrings.c
  69. #
  70.  
  71. ModuleEntry.o: ModuleEntry.c includes/Project.h
  72.  
  73. #
  74.  
  75. ExampleRequest.o: ExampleRequest.c includes/ExampleRequest.h includes/Project.h includes/buildin.strings
  76.  
  77. #
  78.  
  79. Window.o: Window.c includes/Window.h includes/Project.h includes/buildin.strings
  80.  
  81. #
  82.  
  83. HiddenCommand.o: HiddenCommand.c includes/Project.h includes/buildin.strings
  84.  
  85. #
  86.  
  87. modinit.o: modinit.c
  88.  
  89. #######################################################################
  90.  
  91. # Build what from what and how...
  92.  
  93. .c.o:
  94.              sc $(CCOPTS) $*.c
  95. .asm.o:
  96.              sc:c/asm -iASMINC: $*.asm
  97. .cd.strings:
  98.              catcomp descriptor=$*.cd cfile=$*.strings
  99.  
  100. #######################################################################
  101.  
  102. # Done only if the tooltype CLEAN is supplied ...
  103.  
  104. clean:
  105.          delete ~(\#?_strings).o quiet
  106.          copy *.module DOpus5:modules
  107.          setdate \#?.cd
  108.  
  109. #######################################################################
  110.  
  111. # My choice :-) (, but first "ALL" )
  112.  
  113. copy:
  114.         copy *.module DOpus5:modules
  115.         wait 5
  116.         avail flush
  117.  
  118. #######################################################################
  119.  
  120.  
  121.  
  122.